﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Othello_Game
{
    /// <summary>
    /// A normalize attribute implementing IAttributeNormalizedValues interface.
    /// Returns a score indicating corner conquering 
    /// </summary>
    public class CornerConqueredAttribute : IAttributeNormalizedValues
    {
        /// <summary>
        /// Attribute value for conquering corner pieces
        /// </summary>
        /// <param name="actionList">A move to play</param>
        /// <returns>If a corner is taken, return 1.
        /// Otherwise, return 0.</returns>
        public double GetAttributeValues(ActionList actionList)
        {
            return actionList.Pos.IsCornerPosition()? 1.0: 0.0;
        }
    }
}
